import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/localStorage',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/localStorage/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/localStorage',
    method: 'put',
    data
  })
}

export function queryFileByFjlb(data) {
  return request({
    url: 'api/localStorage/queryFileByFjlb',
    method: 'get',
    data
  })
}

export function queryFileByFjlb2(ywid, fjlb) {
  return request({
    url: 'api/localStorage/queryFileByFjlb2?ywid=' + ywid + '&fjlb=' + fjlb,
    method: 'get'
  })
}

export function updateYwid2ById(ywid2, storageId) {
  return request({
    url: 'api/localStorage/updateYwid2ById?ywid2=' + ywid2 + '&storageId=' + storageId,
    method: 'put'
  })
}

export default { add, edit, del, queryFileByFjlb, queryFileByFjlb2, updateYwid2ById }
